package com.waq.utils;

import com.waq.pojo.Customer;
import com.waq.pojo.Register;

public class ConvertUtils {
    //修改登记信息 或 新增登记，需要修改的客户信息表公共内容
    public static Customer convertRegisterToCustomer(Register register, Customer customer ) {
        customer.setCustomerId(register.getCustomerId());
        customer.setCustomerName(register.getCustomerName());
        customer.setCustomerPinyin(register.getCustomerPinyin());
        customer.setGender(register.getGender());
        customer.setAge(register.getAge());
        customer.setTelephone(register.getTelephone());
        //birthday日历
//        customer.setFirstVisitTime();
        customer.setConsultant(register.getConsultant());
        customer.setMarketer(register.getMarketer());
        customer.setBeautyParlour(register.getBeautyParlour());
        return customer;
    }

    public static Register convertCustomerToRegister(Customer customer, Register register) {
        register.setCustomerId(customer.getCustomerId());
        register.setCustomerName(customer.getCustomerName());
        register.setCustomerPinyin(customer.getCustomerPinyin());
        register.setGender(customer.getGender());
        register.setAge(customer.getAge());
        register.setTelephone(customer.getTelephone());
        register.setConsultant(customer.getConsultant());
        register.setMarketer(customer.getMarketer());
        register.setBeautyParlour(customer.getBeautyParlour());
        return register;
    }
}
